include(paths.pri)
include(settings.pri)
include(constants.pri)

TEMPLATE = subdirs
SUBDIRS = src/backends/plaintext
COMPONENTS += Backend_PlainText*

isEqual(BUILD_BACKEND_SQLITE, 1) {
    SUBDIRS += src/backends/sqlite
    COMPONENTS += Backend_SQLite
}

SUBDIRS += src/libniwbillmanager
COMPONENTS += libniwbillmanager*

isEqual(BUILD_UI_QT4, 1) {
    SUBDIRS += src/ui/qt4
    COMPONENTS += Qt4Ui

    isEqual(BUILD_UI_QT4_PLUGIN_ICALEXPORT, 1) {
        SUBDIRS += src/ui/qt4/plugins/icalexport
        COMPONENTS += Qt4Ui_Plugin_iCalExport
    }
    isEqual(BUILD_UI_QT4_PLUGIN_PURGEOLD, 1) {
        SUBDIRS += src/ui/qt4/plugins/purgeold
        COMPONENTS += Qt4Ui_Plugin_PurgeOld
    }
    isEqual(BUILD_UI_QT4_PLUGIN_REPOTS, 1) {
        SUBDIRS += src/ui/qt4/plugins/reports
        COMPONENTS += Qt4Ui_Plugin_Reports
    }
}

CONFIG += ordered

message(Qt version: $$[QT_VERSION])
message(Qt is installed in $$[QT_INSTALL_PREFIX])
message()
message(Install Prefix: $${PREFIX})
message(Install Bin Directory: $${BINDIR})
message(Install Lib Directory: $${LIBDIR})
message(Install Share Directory: $${SHAREDIR})
message(Install Backend Directory: $${BACKENDDIR})
message(Install Header Directory: $${INCLUDEDIR})
message()
message(Building the following components:)
message($${COMPONENTS})
message()
message(To change install targets or components modify paths.pri)
message()
message(Setting Debug: $${DEBUG})
message(Setting Install Qt4 Launcher: $${INSTALL_QT4_LAUNCHER})
message()
message(To change settings modify settings.pri)
message()
message(*** Makefile successfully generated.)
message(*** Start make now.)
